package com.bawei.weekone2207a.view.home.good

import com.bawei.weekone2207a.base.BaseViewModel
import com.bawei.weekone2207a.base.IUiIntent
import com.bawei.weekone2207a.model.RetrofitManager

/**
 * 作者：赵亮
 * 时间：2024/12/14 10:19
 * 功能：商品的View Model
 */
class GoodViewModel : BaseViewModel() {
    override fun handIntent(it: IUiIntent) {
        when (it) {
            is GoodIntent.FindCommodityByKeyword -> httpRequest(
                RetrofitManager.apiService.findCommodityByKeywordEntity(
                    it.keyword,
                    it.page,
                    it.count
                )
            )
        }
    }
}